package main

import (
	"fmt"
	"slices"
)

func main() {
	sl := []string{"脑子", "进", "煎鱼", "了"}

	fmt.Println("从后往前读取")
	for i, v := range slices.Backward(sl) {
		fmt.Println(i, v)
	}
	fmt.Println("正常所有")

	for i, v := range slices.All(sl) {
		fmt.Println(i, v)
	}

	fmt.Println("从大容量截取部分遍历")

	for v := range slices.Chunk(sl, 2) {
		fmt.Println(v)
	}

}
